package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpIncidentEditCustomerEditPageUtil extends SeleniumPageUtil {
	public final static By IECE_INPUT_CUSTOMER = By.id("ctl44_txtNewCustome");
	public final static By IECE_LI_CUSTOMER = By.xpath("//*[@id='ctl44_aceCustomer_completionListElem']/li[8]");
	public final static By IECE_IMG_ASSET = By.id("ctl44_btnAsset");
	public final static By IECE_BUTTON_RESET = By.id("ctl44_btnReset");
	public final static By IECE_BUTTON_CANCEL = By.id("ctl44_btnCancel");
	public final static By IECE_BUTTON_SAVE = By.id("ctl44_btnSave");
	
	public static void waitForPageToLoad(){
		SeleniumUtil.waitOnElements(new By[]{
				IECE_INPUT_CUSTOMER, IECE_LI_CUSTOMER, IECE_BUTTON_RESET, IECE_BUTTON_CANCEL, IECE_BUTTON_SAVE
		});
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(IECE_INPUT_CUSTOMER));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(IECE_LI_CUSTOMER));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(IECE_IMG_ASSET));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(IECE_BUTTON_RESET));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(IECE_BUTTON_CANCEL));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(IECE_BUTTON_SAVE));
	}
}
